package com.moli.iov.handle.real;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.data.redis.connection.RedisSentinelConfiguration;

import redis.clients.jedis.JedisPoolConfig;

import com.moli.iov.cache.RedisUtil;
import com.moli.iov.util.SpringContextUtils;

public class Main {

	private static final Logger logger = LoggerFactory.getLogger(Main.class);
	
	private static final String SERVICE_NAME = "iov-handle-real";
	
	public static void main(String[] args) {
		logger.info("*********************{}正在启动*********************",SERVICE_NAME);
		//加载spring配置文件
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spring/spring-base.xml");
		ctx.start();

		logger.info("*********************{}启动成功*********************",SERVICE_NAME);

		synchronized (Main.class){
			while (true){
				try{
					Main.class.wait();
				}catch (Throwable e) {
					logger.error("启动类异常", e);
				}
			}
		}
	}

	
	
}
